home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Framewrk / FWPart / FWViewAs.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  2.1 KB  |  81 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWViewAs.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWVIEWAS_H
  11. #define FWVIEWAS_H
  12.  
  13. #ifndef FWMREFCT_H
  14. #include "FWMRefCt.h"
  15. #endif
  16.  
  17. #ifndef FWRECT_H
  18. #include "FWRect.h"
  19. #endif
  20.  
  21. //========================================================================================
  22. // Forward class declarations
  23. //========================================================================================
  24.  
  25. class ODFacet;
  26. class ODShape;
  27. struct Environment;
  28.  
  29. class FW_CFrame;
  30. class FW_CShape;
  31. class FW_CPart;
  32. class FW_CPresentation;
  33. class FW_CGraphicContext;
  34.  
  35. //========================================================================================
  36. // CLASS FW_CViewAs
  37. //========================================================================================
  38.  
  39. class FW_CViewAs : public FW_MRefCount
  40. {    
  41. //----------------------------------------------------------------------------------------
  42. //    Constructor(s)/Destructor
  43. //
  44. public:
  45.     FW_CViewAs(Environment *ev, ODTypeToken viewAs);
  46.     virtual ~FW_CViewAs();
  47.     
  48. //----------------------------------------------------------------------------------------
  49. //    New API
  50. //
  51. public:
  52.     virtual void        Load(Environment* ev, FW_CFrame* frame);
  53.     virtual void        Unload(Environment* ev);
  54.     
  55.     virtual ODShape*    AcquireUsedShape(Environment* ev) const;
  56.     
  57.     virtual void        Draw(Environment* ev, 
  58.                             FW_CFrame* frame,
  59.                             ODFacet* facet, 
  60.                             ODShape* invalidShape);
  61.     
  62.     ODTypeToken            GetViewAsToken(Environment*) const
  63.                             {return fViewAs;}
  64.     
  65. //----------------------------------------------------------------------------------------
  66. //    Internal API
  67. //
  68. private:
  69.     void                PrivInvalidateUsedShape(Environment*);
  70.     
  71. //----------------------------------------------------------------------------------------
  72. //    Data Members
  73. //
  74. protected:
  75.     FW_CShape*            fShape;
  76.     ODTypeToken            fViewAs;
  77.     FW_CRect            fThumbnailUsedRect;
  78.     ODShape*            fCachedUsedShape;
  79. };
  80.  
  81. #endif